#include<stdio.h>



void printArray(int arr[]){
    for (int i = 0; i < 6; i++) {
        printf("%d ", arr[i]);
    }
    printf(" | ");
}
void printArrayln(int arr[]){
    for (int i = 0; i < 6; i++) {
        printf("%d ", arr[i]);
    }
    printf("\n");
}

void BubbleSort(int arr[], int size)
{
    int i, j, tmp;
    for (i = 0; i < size - 1; i++) {
        for (j = 0; j < size - i - 1; j++) {
            if (arr[j] > arr[j+1]) {
                tmp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = tmp;
            }
            printArray(arr);
        }
        printArrayln(arr);
    }
}

void QuickSort(int arr[], int size){
    
}

int main(void){
    int a[] = {2, 12, 16, 70, 5, 10};
    printf("123\n");
    printf("*a=%d\n", *(a+1));
    printArrayln(a);
    BubbleSort(a, 6);
    printArrayln(a);
    return (0);
}
